home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
5
/
TIME_ZON
/
CNAMELIS.H
< prev
next >
Wrap
Text File
|
1991-11-08
|
1KB
|
36 lines
/* CNameList.h
This is the header file for an object which is a list of named
objects (each object has a variable called name, see CNObject). It
knows how to keep the list ordered, and knows how to edit the
objects (they actually know how to edit themselves). With CNameList
CNObjects, and CListBox, the list is almost completely self-
contained. NOTE: Since the CNameList doesn't really know what kind
of objects it has, the owner of the CNameList must provide a
function which can create and initialize the objects. See the
CODoc function IODoc() for how this is done.
*/
#define _H_CNameList
#include "CList.h"
#include "CNObject.h"
struct CNameList : CList {
CNObject * (* newFunc)(CObject *); // The initialization routine
CObject * owner; // The object to be passed to the init routine
void INameList(void); // Initialization
void SetNewFunc(CNObject * (*theFunc)(), CObject *); // Set the inti function
int Insert(CNObject *); // Add a new item to the list
CNObject *FindName(char *); // Find an object by name
CNObject *SelectName(void); // Select an object by dialog
Boolean Edit(void);
};
static Boolean NG(CNObject *,long); // Name greater
static Boolean NE(CNObject *,long); // Name equal